import api from '../../../services';
const { updatePwd } = api

export default {
  namespace: "accountSetting",
  state: {},

  subscriptions: {

  },

  effects: {
    *updatePwd({ payload, callback }, { call, put }) {
      const result = yield call(updatePwd, payload);
      callback(result);
    },
    // *updateEmail({ payload }, { call, put }) {
    //   const result = yield call(updateEmail, payload);
    //   if (result.code === 0) {
    //     message.success("导入成功")
    //     yield put({ type: "user/updateUser", payload: { userInfo: result.data } });
    //   }
    //   else {
    //     message.error(result.message, 2)
    //   }
    // },
  },

  reducers: {
    *updateState(state, action) {
      return { ...state, ...action.payload };
    }
  }
}